<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Dom0级</title>
</head>
<body>
  <button>
    <span>Span</span>
  </button>
  
</body>
<script>
  var body = document.getElementsByTagName('body')[0];
  var button = document.getElementsByTagName('button')[0];
  var span = document.getElementsByTagName('span')[0];
  // 默认使用事件冒泡
  body.onclick = function() {
    console.log('I am body');
  }
  button.onclick = function() {
    console.log('I am button');
  }
  span.onclick = function() {
    console.log('I am span');
  }
</script>
<style>
  body {
    background-color: darkcyan;
  }
</style>
</html>